﻿using System;

namespace ZOIL.DataModel
{
    public interface IPersistsVisualProperties
    {
        /// <summary>
        /// Throws an Exception if Persistable with ID is not found
        /// </summary>
        IPersistable GetPersistable(long id);
        /// <summary>
        /// Throws an Exception if Persistable with ID is not found
        /// </summary>
        IVisualProperties GetVisualProperties(long id);
        /// <summary>
        /// Throws an Exception if Persistable with ID is not found
        /// </summary>
        Tuple<IPersistable, IVisualProperties> GetPersistableAndVisualProperties(long id);
        /// <summary>
        /// Returns null of Persistable with id is not found
        /// </summary>
        Tuple<IPersistable, IVisualProperties> GetPersistableAndVisualPropertiesIfExisting(long id);
        void Add(IPersistable p, IVisualProperties prop);
    }
}